<template>
  <div>
    <el-card class="box-card">
      <el-table :data="showlist" border style="width: 100%" size="mini" stripe>
        <el-table-column type="index" label="#" width="50"> </el-table-column>
        <el-table-column prop="authName" label="权限名称" width="180">
        </el-table-column>
        <el-table-column prop="path" label="路径"> </el-table-column>
        <el-table-column prop="level" label="权限等级">
          <template slot-scope="scope">
            <el-tag size="mini" :type="type[scope.row.level]">{{
              scope.row.level | jurisdiction
            }}</el-tag>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { Permissions } from "../../http/api";
export default {
  data() {
    return {
      showlist: [],
      type: ["", "success", "warning"],
    };
  },
  created() {
    Permissions("list").then((res) => {
      console.log(res);
      this.showlist = res;
    });
  },
};
</script>

<style>
</style>